<template>
  <div>home</div>
</template>
<script setup lang="ts">
import { onMounted } from "vue";
import { useRouter } from "vue-router";

const router = useRouter();
onMounted(() => {
  setTimeout(() => {
    //在此处编写一段代码，让路由实现跳转
    //脱离RouterLink
    //编程式路由导航
    router.push("/news");
    console.log("@");
  }, 3000);
});
</script>
